#include "StdAfx.h"
#include "Load.h"
#include "Loader.h"
#include "SetInfo.h"

namespace MnistDigit
{
	static void LoadSet(const SetInfo& setInfo, Visitor& visitor)
	{
		Loader loader(setInfo, visitor);
		loader.LoadSets();
	}

	void LoadTrainSet(const std::wstring& directory, Visitor& visitor)
	{
		const SetInfo setInfo(directory +L"\\train-labels.idx1-ubyte"
			,directory +L"\\train-images.idx3-ubyte", 60000);
		LoadSet(setInfo, visitor);
	}

	void LoadTestSet(const std::wstring& directory, Visitor& visitor)
	{
		const SetInfo setInfo(directory +L"\\t10k-labels.idx1-ubyte"
			,directory +L"\\t10k-images.idx3-ubyte", 10000);
		LoadSet(setInfo, visitor);
	}
}